-- GENERATED SPELL FOR [Scourge Converter] --


function spell0_32257(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(20828,pUnit)
pUnit:RegisterEvent('Sorts_32257', 8334, 1)
end

function spell1_32257(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_32257', 8255, 1)
end

function spell2_32257(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(20822,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32257', 7000, 1)
end

function spell3_32257(pUnit, Event) --@Grip of the Scourge,n/a--
pUnit:FullCastSpellOnTarget(60212,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32257', 5000, 1)
end

function Sorts_32257(pUnit, Event)
local choix_sorts_32257 = math.random(0, 3)
if choix_sorts_32257 == 0 then
pUnit:RegisterEvent('spell0_32257', 1, 1)
end
if choix_sorts_32257 == 1 then
pUnit:RegisterEvent('spell1_32257', 1, 1)
end
if choix_sorts_32257 == 2 then
pUnit:RegisterEvent('spell2_32257', 1, 1)
end
if choix_sorts_32257 == 3 then
pUnit:RegisterEvent('spell3_32257', 1, 1)
end
end

function mob32257_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32257', math.random(1500, 3000), 1)
end

function mob32257_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32257_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32257_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32257, 1, 'mob32257_Action')
RegisterUnitEvent(32257, 2, 'mob32257_Leave')
RegisterUnitEvent(32257, 3, 'mob32257_Kill')
RegisterUnitEvent(32257, 4, 'mob32257_Die')
